import { <%= className %> } from '../entities/<%= tableInfo.table_name %>.entity';
import {IsOptional,ArrayNotEmpty, IsArray} from 'class-validator';
import { PartialType } from '@nestjs/swagger';

export class Create<%= className %>Dto {
    form:<%= className %>
}

export class Update<%= className %>Dto extends PartialType(Create<%= className %>Dto) {}

export class Query<%= className %>Dto {

    <%_ for(let i = 0; i < query.length; i++) { -%>
    @IsOptional()
    <%= query[i].column_name %>:<%= query[i].js_type %>
    <%_ } -%>

    pageSize:number

    pageNum:number
}

export class Delete<%= className %>Dto {
    @IsArray()
    @ArrayNotEmpty()
    ids: number[];
  }